#include"SList.h"
void TestSlist1()
{
	SListNode* plist = NULL;
	SListPushBack(&plist, 1);
	SListPushBack(&plist, 2);
	SListPushBack(&plist, 3);
	SListPrint(plist);
	SListPopBack(&plist);
	SListPrint(plist);
	SListPushFront(&plist, 0);
	SListPrint(plist);
	SListPopFront(&plist);
	SListPrint(plist);
	SListNode* pos = SListFind(plist, 2);
	if (pos)
	{
		//兼具修改的作用
		pos->data = 20;
		printf("找到了\n");
	}
	else
	{
		printf("没找到\n");
	}
	SListPrint(plist);
	SListInsertAfter(pos, 30);
	SListPrint(plist);
	SListEraseAfter(pos);
	SListPrint(plist);
	SListInsertBefore(&plist, pos, 2);
	SListPrint(plist);
	SListEraseCur(&plist, pos);
	SListPrint(plist);
}

void main()
{
	TestSlist1();
}